Skip to content

Conversation

@eshulman2
Copy link
Contributor

Enables creating bootable volumes from images by adding an imageRef
field to the Volume spec. When specified, the volume is created with
the image baked in, making it suitable for boot-from-volume scenarios.

Changes:

  • Add imageRef field to VolumeResourceSpec
  • Add bootable and imageID fields to VolumeResourceStatus
  • Add image dependency with deletion guard
  • Add kuttl tests for bootable volume creation

assisted-by: claude

@github-actions github-actions bot added the semver:minor Backwards-compatible change label Jan 8, 2026
finalizer, externalObjectFieldOwner,
)

var imageDependency = dependency.NewDeletionGuardDependency[*orcv1alpha1.VolumeList, *orcv1alpha1.Image](
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most likely we don't want it to be a deletion guard because I expect that OpenStack allows us to delete an image after a volume was created from it (to be verified). See how we did for the server's dependency on flavor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove it but there is a small danger in that if someone manually deletes the volume after the image is deleted the create image will be called again but would be stuck in a loop of waiting for openstack as the image won't exist (I suspect this is similar to server and flavor)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove it but there is a small danger in that if someone manually deletes the volume after the image is deleted the create image will be called again but would be stuck in a loop of waiting for openstack as the image won't exist (I suspect this is similar to server and flavor)

Is that true? I've just tried creating a volume from an image, deleting the image, then deleting the volume and it worked fine.
Is that an issue you've seen?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting the volume on the ORC level would work but if you delete it on the openstack level manually (using openstack command) I suspect it might cause ORC to into a waiting/watching for the image to exist again (trying to reconcile it state by creating it), haven't tried it but I believe this what would happen in this case (which I believe we are ok with on the orc level).

@eshulman2
Copy link
Contributor Author

/retest

Enables creating bootable volumes from images by adding an imageRef
field to the Volume spec. When specified, the volume is created with
the image baked in, making it suitable for boot-from-volume scenarios.

Changes:
- Add imageRef field to VolumeResourceSpec
- Add bootable and imageID fields to VolumeResourceStatus
- Add image dependency with deletion guard
- Add kuttl tests for bootable volume creation

assisted-by: claude
@mandre mandre enabled auto-merge January 21, 2026 13:01
@mandre mandre added this pull request to the merge queue Jan 21, 2026
Merged via the queue into k-orc:main with commit f1dc06e Jan 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:minor Backwards-compatible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants